<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<html> 
	<head>
		<title>用户信息</title>
	</head>
	<body>
		<html:form action="user.do?op=showUser" method="post">
			<table>
				<tr>
					<td>用户名</td>
					<td><html:text property="user.name"></html:text></td>
				</tr>
				<tr>
					<td>真实姓名</td>
					<td><html:text property="user.trueName"></html:text></td>
				</tr>
				<tr>
					<td><html:submit>提交</html:submit></td>
					<td><input type="button" onclick="javascript:window.location.href='adduser.jsp'" value="添加用户"/></td>
				</tr>
				
			</table>
			<table>
				<tr>
					<td>ID</td>
					<td>用户名</td>
					<td>真实姓名</td>
					<td>注册时间</td>
					<td>操作</td>
				</tr>
				<tr>
					<logic:notEmpty name="userList">
						<logic:iterate id="user" name="userList">
							<tr>
								<td>${user.id }</td>
								<td>${user.name }</td>
								<td>${user.trueName }</td>
								<td>${user. startTime}</td>
								<td>
									<html:link action="user.do?op=delUser&user.id=${user.id}" onclick="javascript:return confirm('确定要删除吗？');">删除</html:link>
									<html:link action="user.do?op=editUser&user.id=${user.id}">修改</html:link>
								</td>
							</tr>
						</logic:iterate>
					</logic:notEmpty>
				</tr>
			</table>
		</html:form>
	</body>
</html>

